History preservation in a computer storage system

ABSTRACT

A method by which a disk-based distributed data storage system is organized for protecting historical records of stored data entities. The method comprises recording distinct states of an entity, corresponding to different moments of time, as separate entity versions coexisting within the distributed data storage system, and assigning expiration times to the entity versions independently within each of a plurality of storage sites according to a shared set of rules, before which times deletion is prohibited.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation application of and claims priority toU.S. application Ser. No. 10/374,517, filed on Feb. 26, 2003.

TECHNICAL FIELD

The invention relates to storage systems for computers, and particularlyto systems designed for long-term storage of data.

BACKGROUND

In disk-based storage systems, there is usually a clear separationbetween the primary storage function—which deals with providing rapidand efficient access to active data—and secondary storage mechanismswhich deal with less active data, with long term data protection, andwith maintaining archives of historical storage contents.

These secondary functions have, for the most part, traditionally beenhandled using magnetic tape storage. Reasons for this include the factthat tape has been much cheaper than disk storage (and otheralternatives), and tape cartridges are easily transported to provideoffsite copies of data to protect against loss due to localizeddisasters.

For a number of years, the cost per byte of disk hardware has beendropping at a much faster rate than that of tape hardware, making diskincreasingly attractive as an alternative to tape as a medium forsecondary storage. Some of the properties of disk, such as low-latencyrandom access, clearly make it superior to tape as a secondary storagemedium. If, however, the superior properties of disk are exploited in asecondary storage system, then new challenges arise which did notpreviously exist with tape.

For example, since every hard disk drive includes the mechanism forreading and writing the media that it contains, in a disk-basedsecondary storage system it becomes attractive to keep all data onlineat all times. This means that traditional mechanisms for protectingarchival data, based on physically isolating and protecting the storagemedia, become inapplicable. One could simply turn the disks intowrite-once media by disallowing deletions in hardware, but then deletionof old data that are no longer needed would also be prohibited.

Moreover, for low cost safe disk storage it may be attractive to use anobject storage scheme, such as is described in Margolus et al., “A DataRepository and Method for Promoting Network Storage of Data,” US2002/0038296 A1 (Mar. 28, 2002). An object storage system is like a filesystem without a built-in mechanism for organizing the files (“objects”)into a hierarchy. The clients of the object storage system must defineand implement any such mechanism, for example by storing directoryinformation in objects. This lack of built-in hierarchy separates out acomplicated issue from the implementation of the storage system itself.

In the example of Margolus et al. US 2002/0038296, security and privacyconsiderations are addressed by assuming that the storage system haslittle or no access to information about the structure or nature of thedata that it stores. This constraint adds an extra dimension to theproblem of safely allowing deletion of unnecessary data, whileprotecting necessary data from malicious or accidental deletion.

If deletion of unnecessary data is to be allowed, mechanisms are ofcourse required for determining which data has become unnecessary.Traditional backup schemes maintain “snapshots” of storage systemcontents at predefined moments, discarding some snapshots as unnecessaryafter some period of time. File servers often use an on-disksnapshotting mechanism for short-term protection of files from datacorruption or accidental deletion. Commonly, this is implemented bysimply avoiding overwriting data that is needed for some existingsnapshot, and instead writing the new data to a new location (andmaintaining appropriate indexing information for finding the differentversions of files). A snapshot is created by declaring at some point intime that no data that exists at that point will be overwritten. Asnapshot is discarded by freeing storage resources that are not neededby any other snapshot, and are not currently in use.

Thus one definition of unnecessary data is data that is only needed bydiscarded historical snapshots. The challenge of deleting onlyunnecessary data then requires reconciling this definition with theconstraints and structure of a distributed, private and secure storagesystem. For example, it may not be possible, in general, for a storageserver to determine which stored data is part of a given historicalversion, or even which historical versions exist. This problem iscompounded if some pieces of data are shared: different historicalversions of the same object, or even different objects, may all sharecommon pieces of data, for storage efficiency. These pieces may only bedeleted when they are no longer needed by any version of any object.Finally, there may be more sophisticated needs for the protection ofhistorical information than are provided by simple snapshotting.

SUMMARY

In one aspect, the invention features a method by which a disk-baseddistributed data storage system is organized for protecting historicalrecords of stored data entities. The method comprises recording distinctstates of an entity, corresponding to different moments of time, asseparate entity versions coexisting within the distributed data storagesystem, and assigning expiration times to the entity versionsindependently within each of a plurality of storage sites according to ashared set of rules, before which times deletion is prohibited.

Preferred implementations of this aspect of the invention mayincorporate one or more of the following. The shared set of rules mayrequire that unexpired entity versions not be changed. The storagesystem may be adapted for storing an unstructured-set of entities. Theunstructured set may comprise more than a million entities, or more thana billion entities. The storage system may associate an entity with anidentifier chosen by the storage client. The storage system mayassociate an entity version with an identifier that depends on a hash ofits contents. A client of the distributed storage system may definemechanisms to organize the storage system into a hierarchical filesystem, with separately accessible entities playing the roles of filesand directories. Expiration times of entity versions may be extended,and extension periods for different versions may be specifiedindependently. An expiration time may be extended at the request of aclient of the storage system. Information about the entity may bereplicated to a plurality of storage sites, with the set of sites chosenbased on a hash. Entity versions may be accessed separately, withoutneeding to access a larger aggregate first. The plurality of storagesites may be located in different cities. No single individual may beallowed physical access to all of the plurality of storage sites.Administrative mechanisms may exist for overriding the deletionprohibition. No single individual may be given the authority to overridethe deletion prohibition at all of the plurality of storage sites. Theversions of the entity may be assigned deposit times, and the versionwith the latest deposit time may be considered current. Non-currentversions may be assigned expiration times. The deposit time may bespecified by a client of the distributed storage system. The deposittime may be based on the time the deposit reaches a storage site. Thedeposit time may be constrained to agree with the actual time that thedeposit reaches a storage site, to within predetermined limits. Theactual time may be determined by clocks at the storage site, operatingwithout reference to an external time standard. The actual time may bedetermined by clocks at the storage site, with a limit to a totalcorrection applied per fixed period using an external time standard. Noconstraint may be imposed if the deposit time specified by the client isearlier than the latest deposit time of any existing version of theentity. The entity may be used to record the history of a file in asource file system, and an historical version of the file may be addedfrom a separate record of the file system's history with a deposit timethat precedes the most current version of the entity. The imposition ofthe constraint may begin at a predefined event, before which eventversions of the entity may be deposited with deposit times that violatethe constraint. The predefined event may be the deposit of a version ofthe entity with a deposit time specified that agrees with the actualtime, to within predetermined limits. The predefined event may be arequest from a storage client to begin monitoring deposit times for theentity. A client of the distributed storage system may deposit recordsof a source file system's history into the storage system, with entitiescorresponding to files and directories, and the deposit times specifiedfor versions of entities may correspond to times associated with therecords. Two distinct entities, each of which holds records of thecontent of a file in the source file system during different timeintervals, may be linked within a third entity. The third entity may beassociated with a directory in the source file system. The expirationtime assigned to a non-current version may depend on when it wassuperseded as the current version. The expiration time assigned to thenon-current version may depend on the deposit time that was assigned toit when it was current. The expiration time assigned to the non-currentversion may depend on the deposit time assigned to the version thatsuperseded it as the current version. The expiration time assigned tothe non-current version may depend on the actual time when it wassuperseded as the current version. The storage client may supplyinformation that allows the storage system to associate a version withthe version that it supersedes as the current version. The informationsupplied by the storage client may allow the storage system to order theversions of the entity by deposit time. The expiration time may dependon the length of the time interval during which the version was current.The expiration time may depend upon which defined snapshot moments theversion was current during. The expiration time may depend on thedeposit times of non-current versions of the entity. A version may bedeposited, and the expiration time for it may be set by the storageclient. A version may be deposited, and a time interval during which itis presumed to have been current may be assigned by the storage client.The expiration time may depend on the time interval during which aversion is presumed to have been current. A plurality of versions of afirst entity which are deposited during a time interval may all havetheir expiration times extended to at least a first expiration time. Asecond entity which records hierarchical directory information includingthat of the first entity may have a version deposited during the timeinterval which expires earlier than the first expiration time. Summaryinformation may be stored in a version of the second entity that doesnot expire before the first expiration time, that is sufficient torecreate hierarchical directory information of the version that does. Aversion may make reference to constituent blocks of stored content, witheach block assigned a reference count which reflects the number ofreferences there are to the block in any version. The version may bedeleted by a storage client, the reference counts assigned to itsconstituent blocks of stored content may be decremented, and a blockwith reference count of zero may be discarded and its storage space maybe reused. Versions may make reference to constituent blocks of storedcontent, with each block assigned a reference count which reflects thenumber of references there are to the block in current versions. Eachblock may also be assigned an expiration time that depends on the latestof expiration times associated with versions which make reference to it.A block which has a reference count of zero and an expiration time whichhas passed may be discarded, and its storage space may be reused. Thereference counts for blocks of stored content may be incremented whenthe blocks are deposited. The expiration time for a block of storedcontent may be set to a default non-zero value when the block isdeposited. Entities may be associated with entity version records, witheach entity version record storing the association between an entityidentifier freely chosen by a storage client and the versions of theentity. Each entity version record may be assigned a reference countwhich reflects the number of references there are to the correspondingentity from within current entity versions. Each entity version recordmay also be assigned an expiration time that depends on the latest ofall of the expiration times associated with the versions of the entityrecorded in the version record. An entity version record with referencecount of zero and an expiration time which has passed may be discardedand the storage space may be reused. The expiration time for an entityversion record may be set to a default non-zero value when it iscreated. The blocks of stored content may be strings of bytes with apredetermined maximum length. A block may be referenced using a blockname which depends upon a hash of the content of the block. The blockcontent may be encrypted using a key derived from its unencryptedcontent.

In another aspect, the invention features a method by which a disk-baseddistributed data storage system is organized for protecting historicalrecords of stored data entities. The method comprises recording distinctstates of an entity, corresponding to different moments of time, asseparate entity versions coexisting within the distributed data storagesystem, associating time-intervals with entity versions, correspondingto the times during which each entity version was considered current,sharing a set of rules for retaining entity versions among a pluralityof storage sites, and designating some entity versions as deletable andsome as undeletable independently at each of the plurality of storagesites.

Preferred implementations of this aspect may incorporate one or more ofthe following. Except for deletion, entity versions may be immutable.Expiration times may also be assigned to some entity versions,independently within each of the plurality of storage sites, accordingto a shared set of rules, before which times deletion may be prohibited.No single individual may be given the authority to override the deletionprohibition at all of the plurality of storage sites.

In another aspect, the invention features a method by which a disk-baseddata storage system is organized for protecting historical records ofstored data entities. The method comprises recording distinct states ofan entity, corresponding to different moments of time, as separateentity versions coexisting within the data storage system, assigningexpiration times to the entity versions, before which times deletion isprohibited, and assigning expiration times to blocks of stored contentthat constitute the entity versions, with at least one block sharedbetween different entities.

Preferred implementations of this aspect of the invention mayincorporate one or more of the following. The data storage system may bedistributed and the expiration times may be assigned independentlywithin each of a plurality of storage sites according to a shared set ofrules. The expiration time assigned to a block may reflect the latest ofthe expiration times associated with a plurality of versions which makereference to it. A block may be assigned a reference count whichreflects the number of references there are to the block in a pluralityof versions which are not scheduled to expire. A block may be assigned areference count which reflects the number of references there are to theblock in a plurality of versions which are scheduled to expire duringsome specified finite time period. The block may also be assigned adefault expiration time that depends on a time of origin associated withthe block itself. The default expiration time may depend upon theexpiration times assigned to each of a plurality of versions which makereference to the block. A block with a reference count of zero and adefault expiration time which has passed may be discarded and itsstorage space may be reused. An authorized storage client may cause ablock to be discarded which has a default expiration time which has notyet passed. An authorized storage client may cause a version to bedeleted for which the assigned expiration time has not yet passed. Ablock referenced by the deleted version may be discarded and its storagespace may be reused.

In another aspect, the invention features a method for keeping track ofwhen all references of a specified category made to elements have beenremoved. The method is designed to fail in a manner that does notfalsely conclude there are no references. The method comprises computinga hash value that identifies the source of a reference, combining hashvalues using a first operation to record the addition of references,combining hash values using a second operation to record the removal ofreferences, and concluding that reference additions for an element havebeen matched by reference removals.

Preferred implementations of this, aspect of the invention mayincorporate one or more of the following. The hash may be acryptographic hash. The first operation may include counting the numberof reference additions. The first operation may include adding togetherhashes. The first operation may include adding corresponding bits ofhashes together modulo 2. The hash value uniquely may identify thereference source. Additional information not needed to identify thereference source may be included in the identifying hash. Hash valuesmay be combined at a physical location that is separated from a sourceof references. The additional information may be examined at thelocation where the hash values are combined, and a decision may be madeto not combine a hash value. The additional information may be examinedat the location where the hash values are combined, and determines whichcategories of combined hash will be affected. A reference-removaloperation may be performed on one category of combined hash and areference-addition operation may be performed on another. Referencesources and combined hashes may be distributed among a collection ofcomputers. The computers may be servers in a disk-based data storagesystem. The data storage system may be organized for protectinghistorical records of stored data entities. Distinct states of an entitymay be recorded, corresponding to different moments of time, as separateentity versions coexisting within the data storage system. Expirationtimes may be assigned to the entity versions, before which timesdeletion is prohibited. Expiration times may be assigned according to ashared set of rules. Expiration times may be assigned to blocks ofstored content that constitute the entity versions. A hash value mayidentify the reference of an entity version to a block that is sharedwith other entities. Information about the shared set of rules may beincluded in the reference-identifying hash. Information that allows thegeneral deletion prohibition to be ignored may be included in thereference-identifying hash. Reference additions to the shared block mayhave been matched by reference removals, and the shared block may bediscarded and its storage space may be reused.

In another aspect, the invention features a method by which more thanone client program connected to a network stores the same data item on astorage device of a data repository connected to the network. The methodcomprises encrypting the data item using a key derived from the contentof the data item, determining a digital fingerprint of the data item,storing the data item on the storage device at a location or locationsassociated with the digital fingerprint, and assigning an expirationtime to the data item, before which time deletion is prohibited.

Preferred implementations of this aspect of the invention mayincorporate one or more of the following. Rules governing expiration anddeletion may be distributed among a plurality of storage sites. Theexpiration time assigned to the data item may depend upon expirationtimes assigned by the client programs.

In another aspect, the invention features a method by which more thanone client program connected to a network stores the same data item on astorage device of a data repository connected to the network. The methodcomprises determining a digital fingerprint of the data item, testingfor whether the data item is already stored in the repository bycomparing the digital fingerprint of the data item to the digitalfingerprints of data items already in storage in the repository,challenging a client that is attempting to deposit a data item alreadystored in the repository, to ascertain that the client has the full dataitem, and assigning an expiration time to the data item, before whichtime deletion is prohibited.

Preferred implementations of this aspect of the invention mayincorporate one or more of the following. Rules governing expiration anddeletion may be distributed among a plurality of storage sites. Theexpiration time assigned to the data item may depend upon expirationtimes assigned by the client programs.

In another aspect, the invention features a method by which more thanone client program connected to a network stores the same data item on astorage device of a data repository connected to the network. The methodcomprises determining a digital fingerprint of the data item, storingthe data item on the storage device at a location or locationsassociated with the digital fingerprint, associating the data item witheach of a plurality of access-authorization credentials, each of whichis uniquely associated with an access owner, assigning an expirationtime to the data item, before which time deletion is prohibited, andpreparing a digital time stamp of a plurality of records associatingdata-items and credentials, to allow a property of these records to beproven at a later date.

Preferred implementations of this aspect of the invention mayincorporate one or more of the following. Rules governing expiration anddeletion may be distributed among a plurality of storage sites. Theexpiration time assigned to the data item may depend upon expirationtimes assigned by the client programs.

In another aspect, the invention features a method by which more thanone client connected to a network stores the same data item on a storagedevice of a data repository connected to the network. The methodcomprising determining a digital fingerprint of the data item, testingfor whether a data item is already stored in the repository by comparingthe digital fingerprint of the data item to the digital fingerprints ofdata items already in storage in the repository, associating with a dataitem an informational tag which may be read by at least some clientprograms, and assigning an expiration time to the tagged data item,before which time deletion is prohibited.

Preferred implementations of this aspect of the invention mayincorporate one or more of the following. Rules governing expiration anddeletion may be distributed among a plurality of storage sites. Theexpiration time assigned to the tagged data item may depend uponexpiration times assigned by the client programs.

In another aspect, the invention features a method by which a clientconnected to a data repository over a lower speed network connection mayprovide higher speed access to a data item for application processingthan is possible over the relatively low speed connection to thenetwork, the method comprising determining a digital fingerprint of thedata item, testing for whether the data item is already stored in arepository by comparing the digital fingerprint of the data item todigital fingerprints of data items already in the repository, only ifthe data item is not already in the repository, transferring the dataitem over the lower speed connection from the client to the repository,assigning an expiration time to the data item, before which timedeletion is prohibited, making a higher speed connection between anapplication server and the data repository, executing an application onthe application server to process the data item stored on the datarepository, and returning at least some of the processed data to theclient across the lower speed connection.

Preferred implementations of this aspect of the invention mayincorporate one or more of the following. Rules governing expiration anddeletion may be distributed among a plurality of storage sites. Theexpiration time assigned to the data item may depend upon expirationtimes assigned by the client programs.

In another aspect, the invention features a method by which multipleclients browse content on a network such as the Internet. The methodcomprises each of the multiple clients accessing content on the networkvia one or more proxy servers, determining the digital fingerprint of anitem of content passing through the proxy server, storing the item ofcontent in a content repository connected to the proxy server at alocation associated with the digital fingerprint, assigning anexpiration time to the item of content, before which time deletion isprohibited, testing for whether a content data item is already stored inthe repository by comparing the digital fingerprint of the content dataitem to the digital fingerprints of content data items already instorage in the repository, and associating a content data item alreadystored in the repository with an access authorization credentialuniquely associated with an access owner.

Preferred implementations of this aspect of the invention mayincorporate one or more of the following. Rules governing expiration anddeletion may be distributed among a plurality of storage sites. Theexpiration time assigned to the item of content may depend uponexpiration times assigned by the multiple clients.

In another aspect, the invention features a method by which clientsstore content items which are broken into up into smaller data items ina data repository connected to the network. The method comprisesdetermining a digital fingerprint of a data item, testing for whether adata item is already stored in the repository by comparing the digitalfingerprint of the data item to the digital fingerprints of data itemsalready in storage in the repository, and assigning an expiration timeto a data item, before which time deletion is prohibited.

Preferred implementations of this aspect of the invention mayincorporate one or more of the following. Rules governing expiration anddeletion may be distributed among a plurality of storage sites. Theexpiration time assigned to the data item may depend upon expirationtimes assigned by the multiple clients. The expiration times assigned todata items that comprise a content item may depend upon an expirationtime assigned to the content item. The content item may be broken up ina manner that is independent of the content. The content item may bebroken up in a manner that depends on the content type. The content itemmay be broken up at boundaries defined by predetermined byte strings.The choice of which byte strings constitute boundaries may depend uponthe value of a hash function acting on the byte strings.

In another aspect, the invention features a method for ensuring thatrules that prevent premature deletion of entity versions are enforced bycorrectly operating servers that store the blocks of content thatcomprise the entity versions. The method comprises computing a hashvalue that identifies the source of a reference to a block of content,incorporating into the hash value a description of rules or parametersthat are needed in order to enforce rules, and communicating informationwhich allows the hash value to be computed, to a server that stores theblock of content.

Preferred implementations of this aspect of the invention mayincorporate one or more of the following. The hash may be acryptographic hash. The hash value may uniquely identify the referencesource. A block of content may be identified by a digital fingerprintthat involves a hash of its content. A block of content may be assignedan expiration time, before which time deletion may be prohibited. Theblocks of content may be distributed among a plurality of storage sites.An expiration time assigned to an entity version may also be assigned toeach of its constituent blocks of content. The information which allowsthe hash value to be computed may be included in a request to delete theblock of stored content. A server storing the block of content may denya request that violates a rule or parameter specified in the informationsupplied when the block was created. Distinct states of an entity may berecorded, corresponding to different moments of time, as separate entityversions coexisting within a data storage system. The rules governingdeletion of an entity version may depend upon when the entity versionwas created. Hash values that identify references to blocks of storedcontent may be combined as part of a reference counting scheme. Somereference counts may be associated with expiration times, and theirvalues may be ignored after some point in time. The connection betweenan entity version and a constituent block of content may not be visibleto a server storing the block of content. The stored block of contentmay expire and the server storing it may discard it and may reuse itsstorage space. The information supplied by the storage client thatassociates a version with a superseded version may be discarded whilethe two versions are retained.

In another aspect, the invention features a method by which adistributed disk-based data storage system is organized for protectinghistorical records of stored data entities. The method comprisesrecording distinct states of an entity, corresponding to differentmoments of time, as separate entity versions coexisting within the datastorage system, assigning expiration times to the entity versions,before which times deletion is prohibited, assigning expiration times toblocks of stored content that constitute the entity versions; andassigning a reference count to a block of stored content that reflectsthe number of references there are to the block in entity versions whichare scheduled to expire during some specified finite time period.

Preferred implementations of this aspect of the invention mayincorporate one or more of the following. The block may also be assigneda reference count that reflects the number of references there are tothe block which are not scheduled to expire. The block may also beassigned a default expiration time which sets an earliest time that theblock can expire, even if all expiration related reference counts arezero. The data storage system may be distributed and the expirationtimes may be assigned independently within each of a plurality ofstorage sites according to a shared set of rules. An authorized storageclient may cause a block to be discarded and its space may be reusedwhen its expiration time has not yet passed. An authorized storageclient may override the deletion prohibition and may cause an entityversion to be deleted when its expiration time has not yet passed. Ablock of stored content referenced by the deleted version may bediscarded and its storage space may be reused.

In another aspect, the invention features a method by which a disk-baseddata storage system is organized for protecting historical records ofstored data entities. The method comprises recording distinct states ofan entity, corresponding to different moments of time, as separateentity versions coexisting within the data storage system, and assigningfinite expiration times to entity versions based on information suppliedby the storage client, before which times deletion is prohibited andafter which times deletion is allowed.

Preferred implementations of this aspect of the invention mayincorporate one or more of the following. A version may be deposited,and the expiration time for it may be set by the storage client. Aversion may be deposited, and a time interval during which it ispresumed to have been current may be assigned by the storage client. Theexpiration time may be assigned by a storage server and may depend onthe time interval during which a version is presumed to have beencurrent. The entity may be used to record the history of a file in asource file system, and an historical version of the file may be addedfrom a separate record of the file system's history. The addedhistorical version may have an interval during which it is presumed tobe current specified that predates that of an existing version of theentity. Expiration times of entity versions may be extended, andextension periods for different versions may be specified independently.Unexpired entity versions may not be changed. The storage system may beadapted for storing an unstructured-set of entities. The connectionbetween an entity version and a constituent block of content may not bevisible to a server storing the block of content. A plurality ofversions of a first entity which are deposited during a time intervalmay all have their expiration times extended to at least a firstexpiration time. A second entity which records hierarchical directoryinformation including that of the first entity may have a versiondeposited during the time interval which expires earlier than the firstexpiration time. Summary information may be stored in a version of thesecond entity that does not expire before the first expiration time,that is sufficient to recreate hierarchical directory information of theversion that does. Versions may make reference to constituent blocks ofstored content, with each block assigned a reference count. Each blockmay also be assigned an expiration time that depends on the latest ofexpiration times associated with versions which make reference to it. Ablock which has a reference count of zero and an expiration time whichhas passed may be discarded, and its storage space may be reused.

Other features and advantages of the invention will be apparent from thedrawings, detailed description, and claims.

DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram showing a storage clique (storage site)consisting of four storage servers, connected to some backup clientsover a local area network.

FIG. 2 is a block diagram showing three storage sites of an objectstorage system, one in Atlanta, one in Boston, and one in Cairo. Each ofthe sites has independently assigned expiration times to three versionsof object f.

FIG. 3 is a block diagram showing four objects (a, b, c and d) with newversions deposited at the indicated times. Three snapshot moments aredefined, at times t1, t2 and t3.

FIG. 4 shows an example history of expiration times for a datablock. Theblock is first deposited on day 47 of 2003, its expiration time changesas versions referencing it are deposited and deleted, and finally theblock expires and is discarded on day 147 of 2003.

FIG. 5 shows an example of additional information that might becommunicated when object versions that references the datablock of FIG.4 are added or removed. The reference counts in FIG. 4 are replaced withsums of hash values that depend on this additional information.

FIG. 6 is a block diagram showing three storage sites of an objectstorage system, one in Atlanta, one in Boston, and one in Cairo. Each ofthe sites has independently marked the least stable version of d fordeletion.

FIG. 7 illustrates hash-based reference counting. An increment ordecrement request for a datablock includes information specifying rulesand parameters governing deletion of the object that the datablock isbeing added to or removed from, as well as information that locates thesource of the reference. This information is hashed and accumulated.

DETAILED DESCRIPTION

There are a great many different implementations and embodiments of theinvention possible, too many to possibly describe herein. Some possibleimplementations that are presently preferred are described below. Itcannot be emphasized too strongly, however, that these are descriptionsof implementations of the invention, and not descriptions of theinvention, which is not limited to the detailed implementationsdescribed in this section but is described in broader terms in theclaims.

Glossary of Terms

The definitions below reflect the usage of some of the terms used inthis document.

Clique: A cluster of servers at a single storage site.

Coalescence: The merging of datablocks with the same dataname.

Collision: The accidental agreement of hashes of distinct data.

Content Hash: Cryptographic hash of the contents of a datablock.

Continuous History: A complete record of current and historicalversions.

Cryptographic Hash: A hash designed to never have collisions.

Currency Interval: The interval during which a version was current.

Current Version: The object version with the latest deposit time.

Datablock: A string of bytes of bounded size.

Dataname: Content hash of a datablock, used as its unique identifier.

Deposit: The process of sending data to the object storage system.

Directory Object: An object used to record file hierarchy information.

Directory Version: A version of a directory object, current orhistorical.

Expiration Time: A time after which deletion is allowed.

Gateway: An application server acting as a storage system client.

Hash: A psuedo-random map from a byte string to a fixed-length value.

Historical Version: An object version that is not the current version.

Metablock: Storage server representation of an object, specifically arecord linking an object identifier to a version list.

Namespace: A related set of object identifiers.

Object: A collection of object versions named by an object identifier.

Object Identifier: A client-specified identifier for an object.

Object Storage System: A system for storing unstructured sets ofobjects.

Object Version: A set of byte strings, e.g., a set of datablocks.

Policy: A version retention policy.

Reference Count: A count of the number of references to an entity.

Replica: A redundant copy of a block of data, used for data protection.

Scalable: Able to be increased in size and capacity indefinitely.

Self-Backing: Storage that does not require external backup.

Self-Encrypted: Encrypted in a key that depends on the unencrypted data.

Self-Named Data: Data named by a content hash of the data.

Server: A storage server.

Snapshot: A set of object versions that were current at a specifiedmoment.

Snapshot Policy: A policy that assigns expiration times to snapshots.

Stable Version: A version which remains current for a relatively longtime.

Stable Version Policy: A policy that retains stable versions.

Storage Server: A dedicated computer that provides storage services.

Storage Site: A place where a portion of the storage system is located.

Version: An object version.

Version List: A list of versions that make up an object.

Version Retention Policy: A shared set of rules used by storage serversto govern when versions can be deleted.

Version Thinning: The process of deleting versions that have expired.

Introduction

FIG. 1 shows a system diagram of one storage site (storage clique)consisting of several storage servers of an object storage system. FIG.2 shows several such sites connected together over a wide area network,linked together as parts of a geographically distributed storage system.FIG. 1 also shows a selection of storage clients, each of whichcommunicate with the storage clique using a defined object storagesystem protocol.

Client A is a file server running a backup program, which allows changedfile and directory information on the file server to be stored as newversions of objects in the storage system, with each file and directorycorresponding to a distinct object, and each object having multipleversions, corresponding to distinct historical states of the objects.Client B is an NFS gateway, which presents the file system informationstored by client A (including historical information) as a read-onlyfile system using the NFS file sharing protocols. Client C is a tapeserver, which talks to a tape drive.

The example storage system of FIGS. 1 and 2 is an elaboration of the onedescribed in Margolus et al., US 2002/0038296 A1. The overall storagesystem is comprised of a collection of geographically separated storagecenters called “cliques,” each of which is comprised of one or more“storage servers,” which in turn are comprised of one or more processorsand storage devices. Some of the desirable properties of the preferredembodiment of the object storage system are:

(1) Fault Tolerance. The system is composed of a number of servers and anumber of cliques, and there are no single points of hardware failure.Data is stored redundantly. If some predetermined maximum number ofservers are removed from a clique, no data is lost within that clique.If a predetermined number of cliques are removed from the system, nodata that has had time to be communicated to other cliques is lost.Geographic separation makes it unlikely that a disaster affecting oneclique will damage another.

(2) Hash-Based Data Names. Datablocks (called data items in Margolus etal. US 2002/0038296 A1) are strings of bytes with a predeterminedmaximum size that are the basic unit of content. A cryptographic hash ofthe contents of a datablock, called a dataname, is used to name thedatablock in the system, to locate the datablock within the system, andto test whether a new datablock being deposited already exists withinthe system, and hence can be communicated and stored by reference,without transmitting or storing the actual bytes of the datablock.

(3) Self Encryption. Datablocks may be stored in an encrypted form. Ifthe encryption key is derived from the unencrypted contents of thedatablock, then different storage clients will independently turn thesame unencrypted block into the same encrypted block, and so securitycan be achieved while still avoiding the need to transmit and store thesame information repeatedly.

(4) Objects and Versions. The storage system associates an objectidentifier, chosen by a storage client, with stored data. Each objectcan include many object versions of the stored data, each of which isidentified by its deposit time. An object version references some set ofconstituent datablocks using their datanames. Many object versions mayreference the same datablock.

In addition to protecting data against server faults and cliquedestruction, the storage system is designed to allow recovery fromaccidental or malicious deletion or corruption. The primary mechanismfor achieving this is based on the notion of object history. Storageclients define and name data objects which change their contents withtime, but not their names. Each named object may include multipleversions, the latest of which is the “current version;” the rest are“historical versions.” In case a client deletes or corrupts the currentversion, the preservation of some number of historical versions allowsrecovery. Historical versions may also have archival value.

Version Retention

In a distributed object storage system, robustness against physicaldamage to individual cliques comes from redundancy across well-separatedcliques. This same property of geographic separation, together withabstraction barriers that isolate the internal operation of cliques fromoutside control, provides an effective avenue for protecting objecthistory. A shared set of rules governing which object versions must beretained, and for how long, are enforced independently within eachclique: this independent enforcement of a version retention policy makesit impossible for any accidental or malicious act that is mediated byone clique to cause any other correctly operating clique to delete anydata that is not determined by the policy to be deletable. Care mustalso be taken that ordinary storage system operators and administratorshave no special privileges or physical access that let them globallycircumvent or change these policies.

Useful version retention policies can be based on how long a versionremains current. At the moment when a new version is written, the timeinterval during which the superseded version was current becomesapparent: the version was current from the time it was created until themoment it was superseded (or deleted). For this time intervalinformation to be visible to the storage servers, it must be the casethat a new version is created by referencing the current version. Thiswould not be the case, for example, in a storage system in which newversions are completely independent objects as far as the storageservers are concerned, and their linkage to existing objects is onlyvisible to the storage client.

Of course, the connection between different object versions does nothave to be continuously apparent to the storage system: the linkagebetween apparently independent objects in the storage system could beindicated by the storage client at the moment when a new version isbeing written. At that moment, an object version marked “current” couldbe changed to “historical” (and an expiration assigned), while a newobject version marked “current” could be created.

Since the storage client needs a mechanism for accessing object historyin order to be able to “roll back the clock” to a an earlier state, andsince aggregating information that associates object versions reducesthe number of entities that the storage system must manage, it makessense for the system to have a form of “object metadata” that links thevarious object versions together, and to the object identifier. This iscalled a metablock, and it provides access to a list of versions thatincludes dataname references to the actual datablocks that constitutethe versions. If the version-list provides the only link betweenversions, then if the version list is encrypted between accesses usingkey information provided by the storage client at access time, and thiskey information is not stored, then the linkage between versions is notnormally visible to storage servers. A metablock is only one example ofhow an object with multiple versions may be represented in a computersystem.

At the moment a version is superseded, an expiration time can beassigned to it based on the time interval during which it was current(and perhaps other factors). Historical versions are then kept safe bythe server policy of not allowing unexpired versions to be deleted. Aslong as servers constrain historical-version expiration based on thetime interval during which the version was current, storage clientscannot subvert this mechanism. A malicious system administrator withwide sweeping file access privileges could conceivably delete all of thecurrent files to which he has access, but this would define the end ofthe current time-interval of all of those formerly current versions, andthey would be assigned expiration times by the servers which he couldnot hasten. Earlier historical versions that had not expired would alsobe protected. Even if a malicious agent was able to gain total controlof a storage clique at one location, it would have no power to deletethe redundant information about unexpired versions stored at otherlocations, or hasten their expiration.

Expiration assignment is illustrated in FIG. 2. Three cliques are shownin three different cities. Some of the version list information or anobject f that is represented at each of these three storage sites isshown in the illustration. For each of three versions, f1, f2 and f3,each of the three cliques independently computes expiration times andstores them in the version list, during a period when the version listis accessible. Each clique independently prohibits deletion of unexpiredversions.

Note that, as long as the expiration time assigned to a version dependson the time interval during which the version was current, the momentwhen the version is superseded must be determined (or at leastmonitored) by the clique. If this time was specified solely by thestorage client, then a malicious client could subvert the protectionmechanism by specifying old deposit times for new versions, thus makinglong-lived current versions appear ephemeral (and hence they would notbe protected). If the replacement time is determined independently bythe clique, or at least monitored by the clique to be in reasonableagreement with actual time, then this problem does not arise.

This mechanism requires a dependable time standard. There is clearly adanger that any external time standard used by a clique might becompromised, resulting in incorrect and unsafe behavior. One way to dealwith this is to have each clique act as its own time standard: once itsclocks are set during system startup (or restart), they comparethemselves only with each other. It would also be relatively safe to letthe clique use an external time standard as long as the clique refusesto change its clocks by very much in the course of a day. This preventsa malicious agent from doing much damage by manipulating the timestandard.

Note also that minimum guarantees of persistence of history are notendangered by allowing storage clients to delay the expiration ofhistorical versions of objects, or make them permanent.

Snapshot Retention

One useful version retention policy is based on the idea of file systemsnapshots discussed earlier. An understandable and useful retentionpolicy is to simply guarantee access to a complete snapshot of allobjects belonging to a given storage client at specified snapshotmoments, with each snapshot guaranteed to persist for a specified periodof time.

This kind of policy is similar to conventional practice with theretention of backup tapes. For example, if the snapshot moments arechosen to occur every day at some fixed time, then these snapshotscorrespond to daily full tape backups. If some daily snapshots are keptonly for a week, while others are kept for a month or a year or madepermanent, then this policy provides the same level of recoverabilityfrom client deletion or corruption of current data as conventional tapebackup.

Retaining snapshots does not involve actively making copies of objectversions. It is only as a new object version is written that it must bedetermined how long to keep the previous version, in order to retain theinformation needed for reconstructing historical snapshots. For eachcurrent version, as it is superseded, it is apparent exactly which“daily backups” its time interval of currency covered, and if each ofthese backups has an expiration associated with it, then the expirationassigned to the version at this moment is simply the latest of all ofthese.

The relationship of versions and snapshots is illustrated in FIG. 3.Three snapshot moments are defined, at t1, t2 and t3, and four objectsare shown, a, b, c and d. We'll assume for the sake of illustration thatto is the beginning of the operation of the object store, and nothingchanges after the times illustrated. Object a is created and then doesnot change until after t3, and so version a1 remains current for allthree snapshots. For object b, version b1 is current for snapshot 1, andversion b2 is current thereafter. For object d, only three of itsversions (d3, d5 and d7) are current at snapshot moments. If we'refollowing a snapshotting version retention policy, then the rest of theversions of d can be deleted as soon as they are superseded. If snapshot1 items get an expiration of a day, snapshot 2 a week, and snapshot 3 amonth, then a1 lasts a month (measured from t3), c1 lasts a week(starting from t2) and b1 lasts a day (starting from t1). If nothingchanges after the times illustrated, then versions a2, b2, c2 and d7will remain current indefinitely, and so are not subject to expiration.

Notice that a snapshot has both a time at which it is taken and anexpiration period. E.g., a snapshot may be taken every day, but somehave expiration periods of a day, others a week, and still others amonth.

Note that if the object storage system is being used for protecting arecord of data that is actively used on some other “primary” storagesystem (i.e., backup), then as long as changes to the primary storagesystem are eventually copied into the object store, each changed fileversion (for example) will appear as the current object version duringsome set of snapshot moments, and will be protected accordingly.

Adding History

Traditional full backup of disk storage results in snapshots on tapemedia. These have the problem that they have a finite lifetime, not onlybecause the tapes degrade with time, but also because the media becomeobsolete and it becomes difficult to find or maintain hardware that canread old tapes. Thus in cases where tape backup is being displaced byversioned object storage, it may be desirable to be able to transfer oldbackup-tape snapshots into the object storage system, to allow the tapemedia to be retired (see client C in FIG. 1). This may be done longafter an object storage system has taken over the role of directlybacking up a primary storage system (e.g., client A in FIG. 1).

One way to add history to an existing object storage system is to havestorage clients directly write historical versions of existing objects.The current time-intervals associated with these versions are known atdeposit time and so expiration times can be either assigned to them bythe storage system or specified explicitly by the storage client as theyare written. It is natural, for example, to add full-backups of a filesystem in this manner, and the backup snapshots can be added in anyorder. Allowing extra historical versions to be directly added does notaffect the protection afforded by the expiration times assigned toexisting historical versions.

Another way to deal with this is to add the history using a set ofobjects distinct from any existing objects. This has the advantage thatincremental backup tapes recorded from a file system can be loaded inhistorical order to create a full snapshot from each incremental tape,as each successive tape defines new current versions. If the datesassociated with the data on the tapes are assigned to the creation andreplacement times for versions, then the object storage system candetermine the current time-intervals associated with those versions byitself, and hence assign expiration times automatically, according toset policy.

Allowing the operation of “deposit with an old date” does not interferewith the protection afforded object versions which are not being addedin from historical records, as long as only current versions which weredeposited with a significantly out-of-date deposit time can besuperseded with one. This rule prevents, for example, a current versionwhich was deposited a year ago with an up-to-date deposit time frombeing replaced now with a current version with a deposit time of onesecond later

If all incremental tape-history of a source file system is added beforeany new history is added (i.e., before one begins to back up the currentstate of the source file system directly into the object storagesystem), then the same objects can be used for both the tape-history andthe continuing backup. If, on the other hand, old history fromincremental tapes is to be deposited after new history has already begunto be accumulated by direct backup into the storage system, then the twosets of objects can be explicitly linked, to make all of the historyconveniently accessible to the storage clients. This can be done, forexample, by recording the association in appropriate root directoryobjects.

Continuous History

If, for some set of objects, no versions deposited during some timeperiod are deleted, then any moment of the history of that set ofobjects during that period can be reconstructed. The reconstructionconsists of the set of object versions that were current at the givenmoment during that period. For example, if a file system is stored inthe object storage system and no versions of files or directories aredeleted for the first hour that they exist, then any moment of historyfor the most recent hour can be reconstructed as a snapshot.

Both continuous history and discrete snapshots can be combined. Forexample, if the finest-grained discrete-snapshot interval is hourly,then object versions that change more often than that would normally beoverwritten, rather than have historical versions kept. If the storageclient simply extends the expiration time of all object versions to beat least one hour after the moment they are superseded as the currentversion, then all versions of all objects for the most recent hour willbe available. Thereafter, snapshots will be available according to thepredetermined version retention policy, unless expirations areexplicitly extended. If, as another example, all current object versionssuperseded during some particular hour are extended to a month, thencontinuous history will be available for that particular hour, for amonth.

If the storage client is using the object store directly as a filesystem and recording file system directory information in ordinaryobjects deposited in the object store, then there may be a very largenumber of directory versions retained to allow this kind of continuoushistory reconstruction. This can be greatly reduced by being selectiveabout which versions of directories have their expirations extended, andby including extra transaction-log information in the retained directoryversions that allows the deleted versions to be reconstructed.

For example, the client might only keep directory versions whenclient-defined directory metadata changes (e.g., permissions of who isallowed to access the directory). Each retained version is associatedwith a start time and an end time for the period summarized by theversion; a record of the ending contents of the directory; and atransaction log, including the timing, of all file additions, deletions,file renamings and file movements between directories that have affectedthis directory during this time period. This allows any intermediateversion of the directory to be recreated, without keeping explicitversions.

The interaction of summary directories with a snapshotting policy can beillustrated with reference to FIG. 3. Suppose that the interval from t0to t3 is three hours, divided into three equal intervals in the picture.Suppose also that continuous history is being kept for one hour, thatobject d is a directory, and that d's directory metadata does not changeduring the interval t0 to t3. This means that, except for the extradirectory versions (d3 and d5) that are automatically retained at thesnapshot moments, and the current version (d7), all other directoryversions written during the period shown can be deleted as soon as theyare superseded. Each directory version contains a summary of the pasthour, up to that version, and in particular version d7 allows areconstruction of directory contents of versions d4 through d7, d5 canreconstruct d1 through d5, and d3 can reconstruct d1 through d3. Toreconstruct a moment midway between snapshots 1 and 2, the directorycontents of version d4 is reconstructed from the directory contents andtransaction log of the next available directory version (d5), and a1, b1and c1 are part of the reconstructed moment. The extension of theexpirations of the non-current versions a1, b1 and c1 to a minimum ofone hour can be requested by the client as they are superseded, withonly the expirations associated with the discrete snapshot moments setby the clique.

To reconstruct a discrete snapshot moment long after the continuoushistory has expired, no intermediate directory versions need to bereconstructed. Since no directory version will be deleted which wascurrent at any discrete snapshot moment that is still being retained,directories for snapshot moments will always be available. Only theending contents, recorded in the directory version current at thesnapshot moment, is needed.

Eventually, some of the retained directory versions will expire and maybe deleted. Because of the log-start and log-end times associated withthe continuous history directory versions, it will always be clear whichintervals of directory history can still be reconstructed with theavailable information.

Manual Version Thinning

One scheme for protecting version history while still allowingunnecessary versions to be deleted (and the corresponding unneededstorage to be reclaimed) is to leave the protection up to the servers,and the deletion up to the clients.

In this scheme, each datablock has a reference count associated with it.The reference count reflects how many times the block appears as part ofany version, historical or current. Current versions are assigned anexpiration time by the storage server when they are superseded,according to a predetermined retention policy. Expirations can beextended by storage clients. Expired versions can be deleted by astorage system client, but no other versions are allowed to be deleted.Thus necessary versions are protected from deletion by thestorage-server-enforced “retain until expired” policy, but deletionbecomes the responsibility of the storage client.

When an expired version is deleted, the reference counts of all of itsconstituent datablocks are appropriately decremented by the storageserver. A datablock may be deleted from storage, and its spacereclaimed, if its reference count is zero. Note that all reference countdecrementing can be performed by the storage server at the moment whenthe client explicitly deletes an expired version, and so versionmetadata may be encrypted in between times, using a key provided by thestorage client that the storage server uses transiently and does notretain.

This manual scheme has the drawback that it is necessary for the storageclient to periodically access all of its objects in order to deleteunneeded versions. It is also difficult to turn into an automaticserver-side scheme. For example, one could imagine having the storageservers delete any expired versions any time an object is accessed. Thiswould work fine for ordinary files, but not for directory objects, whichwould have to be marked as special and handled directly by storageclients—since the server can not see inside them. If a directory versionwere automatically deleted by a storage server, objects that were onlyreferenced by that version would become unreachable by the storageclient, which could never access them again, and so the storage serverwould never reclaim their space. Both of these problems are fixed by theautomatic scheme outlined in the next section.

Automatic Version and Datablock Deletion

As long as all storage servers in the object storage system agree on thealgorithm for determining the expiration time of a version when it issuperseded as current, then both the version and all of the datablocksthat comprise it can be assigned this expiration time. If the expirationtime of a version is extended, each datablock that it references can beassigned the extended expiration time. If a datablock is referenced byseveral versions, its expiration time becomes the latest of all of theexpiration times assigned to it as part of each version. It is thusguaranteed that a datablock will not expire until all of the non-currentversions that it is part of have also expired. If the datablock is notpart of any current versions, then when it expires it is safe to deleteit. Otherwise it must not be deleted. Thus it is important to knowwhether a datablock is part of any current versions. Therefore eachdatablock has associated with it both an expiration date, determined bythe latest expiring version it is part of, and a current-referencecount, determined by how many current versions it is part of. Adatablock may be deleted if it is not part of any current versions(i.e., its current-reference count equals zero) and it is not part ofany unexpired historical version (i.e., its expiration time has passed).

Using this scheme, space can be reclaimed automatically by the storageservers as soon as versions expire, even if an object is never accessedagain. Furthermore, it makes no difference whether the versions affectedare directories or not. All file and directory versions current at asnapshot moment are kept at least until that snapshot expires. File anddirectory versions that were not current during any unexpired snapshotare not needed, and datablocks referenced only by them can be deleted.For example, in FIG. 3, if snapshot 1 has expired, then the datablocksreferenced only by b1 are no longer needed. Those referenced by b2 arestill current (assuming nothing changes after time t3). If somedatablock is referenced by b1 and c1 and by no other version, it willnot expire until snapshot 2 expires.

If there are current versions of files or directories that are notreachable from the root of the file system, then these files will neverbe superseded and their datablocks will never be released. Thissituation will never arise, however, as long as the file system is keptconsistent and children are deleted before their parent directories are.

Note that, when datablocks are first deposited in the storage system andbefore they have become part of any object version, it may be convenientto guarantee that they persist for some minimum period. Thus datablocksmay be deposited with a non-zero expiration time. This has the effect ofextending the minimum persistence, but it does not hinder the ultimatereclamation of storage space. Alternatively, the current-reference countmay be incremented when the datablock is deposited (or redeposited, inthe case of shared datablocks). This avoids the need for a burst ofreference-count increments when the version referencing the datablock isdeposited. Provisions can be made, if deemed necessary, to decrementreference counts in the a typical case where the associated version isnever deposited.

Note also that the “expiration plus current count” mechanism forcontrolling the deletion of datablocks depends only on access to versioninformation at the moment when a current version is superseded. Noaccess to this information is needed at any other time, and so this isconsistent with a privacy mechanism that does not allow any access toversion information or the composition of versions except while a newobject version is actually being written.

For example, suppose that for each object, the version list whichdescribes which datablocks comprise each version is stored by thestorage servers in an encrypted form, using an encryption key whichclients give to the storage servers only at the moment that the versionis accessed. If the storage servers do not store this key, then thisinformation is unavailable at any other time, thus improving the privacyof the storage system. This brief window of visibility is, however,sufficient to allow the storage servers to assign expiration times todatablocks, and to adjust current-reference counts for datablocks. Ifthis process occurs independently within each storage clique, thennon-current “backup” versions and their associated datablocks will obeythe retention constraints imposed by preset retention policies: backupdata is safe, but unneeded datablocks are server-visibly marked as beingdeletable, and may be automatically deleted.

As another example, suppose that there is no encryption being used, butthat some datablocks are encoded using an erasure correcting code whichis very space efficient and loss resistant, but which requires a lot ofwork to recreate the original data. In this case, it is data safetyrather than security that makes it difficult to access some version anddirectory information. No such access is needed, however, to allownon-current datablocks to expire and be deleted.

Automatic Metablock Deletion

The mechanism outlined in the previous section allows all datablocksthat are referenced only by expired historical versions to be deletedand their space reclaimed. A similar mechanism can be used to allowdeletion of metablocks for objects that contain only expired versions,while protecting unexpired history. In this scheme, a metablock has acurrent-reference count and an expiration time, just like a datablock.We'll call the current-reference count a “link count,” and allow thestorage client to directly control this count. The expiration time,however, will be governed by the clique.

Whenever a reference to an object appears in a new directory versionwhich did not appear in the previous version, the storage clientrequests that the clique increment the link count associated with thatobject's metablock. Similarly, when a reference disappears from acurrent directory, the storage client asks the clique to decrement thelink count. Meanwhile, whenever a new version of the object is written,or the expiration time of any version is made later, the clique adjuststhe expiration time associated with the object's metablock to be thelater of the existing expiration and the new one.

When a metablock's link count reaches zero, then (according to thestorage clients) there are no current directories that reference thisobject—it has been deleted. The clique updates the expiration timeassociated with the metablock, since the current version has beensuperseded and given an expiration time. At this point the object has nocurrent version. When the expiration time associated with the metablockhas also passed, the object has no unexpired versions either. At thispoint the metablock (and its associated version list) can be deleted,and the space associated with them reclaimed.

This scheme also addresses a problem that may occur when an object isfirst created with block information but no version list. If no versionof the object is written within some reasonable period (e.g., a month),the object can be presumed to be an orphan and deleted. A defaultexpiration time for the metablock can be used to accomplish this.

Overriding Version Retention Policy

An administrative mechanism is provided to allow an authorized client todelete non-current versions before they have expired, and to reclaimspace freed by this action. Unauthorized clients are not permitted todelete unexpired versions.

To support this mechanism, datablock expirations are stored in a mannerthat allows expirations that have been assigned to a datablock to laterbe undone, with the expiration reverting to the latest expiration timeassigned which has not been unassigned. This is made easier by the factthat datablock expirations can be stored with low resolution: spacedoesn't need to be freed instantly when the last version that referencesa datablock is deleted. For example, suppose that all datablocks expireeither 10 days, 100 days or 1000 days after they are first created, ornever. This expiration information can be represented using twoadditional reference counts per datablock, to give a total of three.

In this example, the first reference count, which has been discussedearlier, is used to represent version-references to the datablock whichdo not expire. These include references from current versions,references from versions which are marked as “permanent,” and referencesfrom versions which have an expiration of greater than 1000 days afterthe creation time of the datablock—these references are “rounded up” topermanent. The second reference count is used to representversion-references which are between 100 and 1000 days after thecreation time of the datablock. The third reference count representsreferences between 10 and 100 days after the creation time.

If all three counts are zero, the datablock expires 10 days after itscreation time. If the first two counts are zero but not the third, thedatablock expires 100 days after its creation. If the first count iszero but not the second, the block expires after 1000 days. If the firstcount is non-zero, the datablock doesn't expire at all. When a versionis deleted, the expiration time of the version is included in a“decrement request” applied to each of its constituent datablocks. Oneof the three reference counts may be decremented, depending on thedifference between the version expiration time and the block creationtime. Similarly, if a new non-current version is written, its expirationtime is included in an “increment request” applied to each of itsconstituent datablocks. To change the expiration time of a version, itsdatablocks are first incremented using the new expiration time, and thendecremented using the old.

A sample history of expiration times for a datablock is given in FIG. 4.In the example, the datablock is first created on day 47 of 2003. Allthree expiration counters are initially zero, and so the datablock isscheduled to expire 10 days after its creation. In event 2, a version isadded which references this datablock, and which expires on day 109 of2003. This is rounded up to 100 days after the datablock creation, andthe third counter is incremented. A version that expires on day 140 of2003 increments the same counter. In event 5, the version that was addedin event 2 is deleted, and the version reference is removed. The 100 daycounter is decremented, and the datablock expiration time is determinedby the highest order non-zero count. In event 9, a current version isadded which references this datablock. In event 10, this version becomesnon-current and is assigned an expiration. In event 1, a version isadded which expires on day 50 of 2003. None of the counters isincremented since it expires less than 10 days after datablock creation.If no further version references to this datablock are added or deletedafter event 11, then the datablock expires on day 147 of 2003 and may bediscarded and its space reused anytime thereafter.

If two independent copies of a datablock are created and later merged,the creation time of the later-created block is assigned to the mergedblock—this associates an expiration time with each count. The expirationtimes associated with the earlier-created block's counts are “roundedup” to determine which counts to add together. A simple algorithm is tojust add together corresponding counts. A subsequent decrement may thenend up being applied to a lower-order count than the correspondingearlier increment, but this will never free a block early.

Clients may be administratively authorized to delete individual versionsthat expire up to some distance in the future. Deleting versions willresult in the decrementing of datablock reference counts. The resultingstate of the counts will indicate when each datablock will expire, or ifit has already expired. Clients may also be administratively authorizedto globally delete versions that expire up to some distance in thefuture. This results in the expiration time of all datablocks in thestorage system being reinterpreted, with those that fall within theglobal deletion interval being considered already expired, and availableto be discarded and reused. For example, such a client might declare allversions that expire within the next week to be already expired. For asnapshot retention policy, this means that all snapshots that expirewithin a week are instantly deleted, and their space reclaimed.

For increased data safety, it may be desirable to distinguish betweenversions that are not scheduled to expire because they have been markedto be kept permanently, and versions which are not scheduled to expirebecause they are current, and so their expiration is yet to bedetermined. In the former case, normal clients should never be able toaffect the corresponding datablock reference counts, whereas in thelatter case they should. If the requirement for adequate authorizationextends all the way to the datablock level, then references for thesetwo kinds of cases can be accumulated separately. Alternatively,hash-based reference counting can be used.

Reference Counting with Hashes

Cryptographic hashing can be used to implement a form of referencecounting in which version retention policies are enforced both at theversion and at the datablock level. No matter how the datablocks aredistributed across storage sites, each site containing a datablockindependently enforces the version retention policies relevant to thatblock. Cryptographic reference counting prevents malfunctioning orcompromised servers from instructing correctly operating servers toprematurely delete datablocks. This protection depends on the propertyof a cryptographic hash as a “digital fingerprint” which uniquelyidentifies a message.

In cryptographic reference counting (FIG. 7), all information that theserver S2 storing the datablock K needs to enforce the retention policyis communicated with each increment or decrement request (message M).The server S2 computes a cryptographic hash of this information and thisvalue is added or subtracted from a reference count hash total T. Whenthe hash total T reaches zero, the reference count is zero. Otherwise,the reference count is known only to be non-zero. The use ofcryptographic hashes prevents any other server from deleting informationby lying about the relevant enforcement information: the informationspecified with the decrement must always agree with that specified withthe increment, or the hash total will never reach zero.

For non-current versions, the relevant enforcement-information includesthe version expiration time and the namespace_id (M1), and sufficientinformation (M2) to uniquely locate the datablock within an objectversion (handle, version id, etc.). For decrement requests, theexpiration time and namespace_id are specified separately, along with asingle hash of all the other information. This allows the storage serverS2 holding the datablock K to determine which expiration count T shouldbe affected, and to check whether the namespace_id has been authorizedto delete a version with this expiration. If per-object authorization isdesired, the handle can also be specified separately. For incrementrequests, the expiration time along with the hash to be added to thehash-total T can simply be specified, since no checking is needed forincrements.

For datablocks referenced by current versions, each increment requestmust—in addition to information M2 needed to locate the datablock withinan object version—specify the retention policy and the creation timeassociated with the version being created (M1). This information will behashed and added to the hash-total T. When a decrement request is sent,it must include this same information M1 and M2, and this will be usedto calculate the hash needed to decrement the current-referencehash-total T, and to calculate an expiration time. If an expiration timeis explicitly included in the decrement-current request, the later ofthe calculated and the specified times will be used to determine whichdatablock expiration count T to increment.

The use of cryptographic reference counts is illustrated in FIG. 5. Inthis example we have assumed that the reference count increments anddecrements in FIG. 4 have been replaced with cryptographic hash values.In event 3, for example, a message specifying a policy, an expirationtime, a namespace identifier and a location hash is sent with theincrement request, and a hash of this message is added to the 100-dayscounter, instead of incrementing it by one. Similarly, in event 9 amessage is sent with the increment request which specifies that this isa reference from a current version, when the version was created, andwhat policy should be used to assign an expiration when the versionbecomes non-current. We assume that at event 10, the current versionfrom event 9 has been current at hour 0 of a week, but not at hour 0 ofa month, and so it is assigned an expiration time of 30 days from itscreation. All of the information specified in the increment must besupplied at the decrement or the storage server holding the datablockwill not compute the same hash that was added to the no-expiry counterin event 9, and so the no-expiry counter will remain non-zero.

Note that with this scheme, it is not necessary to use separatehash-totals for current-version references and for references fromversions that are permanent.

Other Version Retention Policies

Version retention policies other than those discussed above are useful.For example, one can keep the N most stable versions of each object(i.e., the ones that were current the longest), rather than the versionsthat happen to be current at snapshot moments. This is an example of anon-snapshot policy that protects history, since a malicious or buggystorage client cannot affect how long historical entity versions werecurrent. In contrast, a policy of keeping the N most recent versionswould not protect history, since history could be erased by simplydepositing N empty versions.

Enforcing an “N most stable” policy requires the storage system to haveaccess to information about when each version of a stored entity wascurrent. Currency-intervals are recorded for all versions, and thestorage system looks at this information in applying the “N most stable”policy independently at each storage site, refusing to delete versionsprotected by the shared policy. This is illustrated in FIGS. 3 and 6.Suppose the policy is to keep the current version and up to twohistorical versions of each object, based on stability, with no snapshotpolicy in force. At the point when d4 is deposited in FIG. 3, one of d1,d2 or d3 must be deleted. Since d2 was current for the shortestinterval, it will be deleted. In FIG. 6, we see d2 being independentlyselected for deletion at each storage site, based on a record of theinterval during which each version was current.

Versions and datablocks can be automatically deleted by the objectstorage system when using a most-stable policy. This fits within thesame reference count framework used for snapshot based datablockmanagement. In this case, all versions protected by a most-stable policyhave indefinite lifetimes, just as current versions do under asnapshotting policy. Thus a datablock's “no expiration scheduled”reference count reflects how many references there are to the datablockin current or stable versions—only this count is affected by versionsprotected by a most-stable policy. When there exist N object versionsfor which the most stable N versions are retained, the addition of a newversion results in the automatic deletion of an old version. Theno-expiry reference counts of all datablocks that are part of thedeleted version are decremented. As usual, any datablock with ano-expiry reference count of zero and which has expired may have itsstorage space reused.

The overall policy on prohibition of deletions can involve the union ofseveral different prohibitions, based separately on expirations,stability, and other factors; or on these factors considered jointly.For example, the policy for an object could be to keep the two moststable historical versions, in addition to any versions required by asnapshot-based policy. In this case, up to two historical versions ofeach object have indefinite expirations. If a current version issuperseded and it has lasted longer than one of two existing stableversions, then it becomes one of the two stable versions. The version itreplaces is assigned an expiration time based on the snapshottingpolicy, which looks at the interval during which it was current and anyexpiration explicitly assigned to it. For example, in FIG. 3, supposeversions current at t1 are considered part of snapshot 1 and are givenan expiration of a day; and in addition the two most stable historicalversions are kept. Then when d5 is deposited, d4 replaces d3 as one ofthe two most stable versions, and d3 is given an expiration of a day.Datablocks that are part of current or stable versions have this factreflected in their no-expiry reference counts alone, whereas datablocksthat are part of non-current snapshot versions may have this factreflected in other expiration information.

OTHER EMBODIMENTS

One aspect of the invention that is illustrated by the preferredembodiment is that of protecting history by using a coordinated systemof deposit-time-dependent expiration policies that are independentlyenforced at separate storage locations. This idea can be applied rathergenerally. It could apply equally well to file systems that are aware ofthe nature and structure of stored data and to object storage systemsthat have little or no such access. It can be applied to systems adaptedmainly for seldom-changing archival data, or to systems designed forhigh-performance read-write access.

In preferred implementations, the storage system is made aware that anew item is being stored that should be considered the replacement foran existing item. It is not necessary that the storage system know whichitem is replacing the existing item, only that the replacement is takingplace and what is being replaced. This could be indicated by telling thesystem at deposit time that a deposited item replaces an existing itemas a “current” version, or even by an entirely separate operation inwhich the storage system is informed that an existing item is no longercurrent, and an expiration time should be assigned to it. Thus itemscould be, in general, created as “current” with a deposit time, and atsome later time marked as “historical”, at which point the storagesystem assigns it an expiration time. Some items could also be depositedalready marked as “historical”, with an expiration (or an assumedinterval of currency from which the storage system can infer anexpiration) specified by the storage client. Expiration times could beassigned by storage clients to both current and historical versions, andthe effective expiration would always be the latest of all assignedexpirations. For example, a version might be marked as “permanent”(infinite expiration) while it is still current, and this expirationwould persist even after it is no longer current. As another example, aversion might be given an expiration of a week while current, and theexpiration assigned to it by policy when it becomes historical might bea month, which would override the shorter expiration.

When the distributed storage system is backing up some other kind ofsource storage system, there are many different ways in which the sourceinformation can be mapped into storage entities. For example, each fileand directory of a file system might be mapped into a separately namedand separately accessible object, or an entire snapshot might be mappedinto a hierarchical tree of self-named datablocks which refer to eachother using content based datanames, or some combination of these twoapproaches might be taken. An entire backup record might even be storedas a single string of bytes, with different versions corresponding todifferent backup records. Directories might contain version summaryinformation or not. Additional history of the source storage systemcould be added from tapes or from non-tape media. Many different sourcestorage systems could be backed up into the same distributed storagesystem. If desired, encryption can be used to keep backup data private.

Deposit time information can be determined and monitored in many ways.The important thing is to do something which makes it difficult for anantagonist to manipulate this information. If system monitoring ofdeposit time accuracy for specific objects or sets of objects isinconvenient when history is initially being deposited, it could beturned off at object creation, and only turned on later. As long asmonitoring cannot easily be turned back off, protection of history isprovided.

The method used in the preferred embodiment to allow authorized users tooverride retention policy and recover storage space is quite general.The same method is useful even with just a single reference countassociated with each datablock, with expiration occurring only forblocks that have a zero count, and happening a fixed time after blockcreation (or block merger). For fine control, a large number of countscould be used. The time-range associated with each of the expirationtime counters could be different for different datablocks, and couldchange with time, as long as at each transition old expiration periodsare rounded up when they are converted to new ones. The expiration timeassociated with a block that has all reference counts of zero does nothave to be fixed globally for all blocks, but could be recordedseparately for each block, or for sets of blocks, and could be changedwith time (with normally authorized clients perhaps allowed to increaseit). It could even depend on the expiration times of object versionsthat reference the block which expire during some time interval.

Retention and deletion policies that apply to object versions arepreferably inherited by the datablocks that constitute the objectversions: the rules that apply to datablocks must be consistent with therules that apply to the object versions that reference them. Forexample, the expiration time of a datablock must be no earlier than thatof any object version that includes it as a component. This basicproperty may be achieved rather generally, by having a storage serverthat holds an object version share the relevant rules—along with anyinformation needed to implement them—with the servers that hold thedatablocks the object version references. This sharing occurs when theobject version is created and new references to datablocks are added, sothat the rules governing the removal of these references are safelyestablished.

The preferred embodiment uses a technique of cryptographic referencecounting to ensure that the same information is conveyed to a storageserver when a reference to a datablock is removed as was conveyed whenthe reference was added—thus making this information available withoutplacing the burden on the storage server to retain this information.This takes advantage of the property of a cryptographic hash as a uniquefingerprint associated with a particular message. This techniqueprevents incorrect information in a decrement request from evergenerating the same hash that was computed when the correspondingincrement was performed. This technique can clearly be used to governany kind of distributed reference counting, where accidental ormalicious decrements must be guarded against. A related technique, whichprovides less protection, is to associate a short non-cryptographic hashwith each conventional reference count, with the hash used in the samemanner as the cryptographic hashes discussed. Both the conventionalcount and the associated hash must be zero for the count to beconsidered to have a value of zero. This guards against many causes ofaccidental deletion due to bugs in the software, but not againstmalicious attacks: short hashes don't prevent the falsification ofmessages. Reference counts with hashes are also useful even whendatablocks aren't shared, since they match add-block and delete-blockrequests, and also ensure that any policy and background informationgoverning the deletion is available, or no deletion will occur.

The description of preferred embodiments did not depend on how objectversions are broken up into constituent datablocks. This can been donein a content-independent manner (e.g., fixed length segments), or basedon content or even meta-information (such as file type). For example,email messages might be broken up at attachment boundaries, to increasethe number of shared datablocks. Object versions may even be broken upat a set of byte-strings chosen pseudo-randomly, as is done for examplein the file system discussed by Athicha Muthitacharoen, Benjie Chen andDavid Mazieres in their paper, “A Low-Bandwidth Network File System”,that appeared in 2001 in “Symposium on Operating Systems Principles,”pages 174-187.

It is to be understood that the foregoing description is intended toillustrate a few possible implementations of the invention. These and agreat many other implementations are within the scope of the appendedclaims.

1. A method for ensuring that rules that prevent premature deletion ofdata objects stored in a storage system are enforced by servers thatstore blocks of content that constitute the data objects, the methodcomprising: associating distinct reference source identifiers with eachof a plurality of storage system entities that make reference to blocksof content; associating a set of rules with a data object, the set ofrules governing when deletion is allowed and when it is disallowed;computing a hash value based at least in part on both a reference sourceidentifier and information descriptive of or used by the set of rules;and communicating information which allows the hash value to becomputed, to a server that stores a block of content that is aconstituent of the data object; wherein the communicated information ispart of a request to delete the block of content; and wherein whendeletion of the data object is disallowed, modification of the contentof the data object is also disallowed.
 2. The method of claim 1 in whichthe hash is a cryptographic hash.
 3. The method of claim 1 in which theblock of content is identified by a digital fingerprint that involves ahash of its content.
 4. The method of claim 1 in which the block ofcontent is assigned an expiration time, before which time deletion isprohibited.
 5. The method of claim 4 in which an expiration timeassigned to the data object is also assigned to each of its constituentblocks of content.
 6. The method of claim 4 in which, during a certaintime period, the connection between the data object and the block ofcontent is not visible to the server storing the block of content. 7.The method of claim 6 in which, during the certain time period, theexpiration time of the block of content passes and the server storing itdiscards it and reuses its storage space.
 8. The method of claim 4 inwhich no action taken by a client of the storage system can cause theexpiration time to be changed to an earlier time.
 9. The method of claim8 in which the client deposits the data object into the storage system.10. The method of claim 8 in which the client causes the expiration timeassigned to the data object to be changed to a later time.
 11. Themethod of claim 8 in which an action taken by the client causes a valueto be assigned to the expiration time.
 12. The method of claim 4 inwhich no action taken by any client program that only communicates withthe storage system over a wide area network can cause the expirationtime to be changed to an earlier time.
 13. The method of claim 1 inwhich the block of content are stored at a plurality of storage sites.14. The method of claim 1 in which a server storing the block of contentdenies a request that violates one or more of the set of rules.
 15. Themethod of claim 1 in which distinct states of the data object arerecorded, corresponding to different moments of time, as separateversion data objects coexisting within the storage system.
 16. Themethod of claim 15 in which the set of rules depends upon when a versiondata object was created.
 17. The method of claim 1 in which the hashvalue is combined with other hash values associated with otherreferences to the block of content, to form a reference record that isused as part of a reference counting scheme.
 18. The method of claim 17in which the reference record is associated with an interval ofexpiration times, with the interval comprising a specified starting timeand a specified ending time.
 19. The method of claim 18 in which thereference record is a sum of hash values associated with references tothe block of content.
 20. The method of claim 19 in which a reference isremoved from the reference record by subtracting a hash value associatedwith the reference.
 21. The method of claim 18 in which, at times duringthe interval of expiration times, the reference record indicates anon-zero number of references to the block of content and the block isretained.
 22. The method of claim 18 in which, at some time during theinterval of expiration times, the reference record indicates zeroreferences to the block of content and the block is discarded.
 23. Themethod of claim 18 in which the reference record indicates a non-zeronumber of references to the block of content but the specified end timeof the interval of expiration times has passed and the block isdiscarded.
 24. The method of claim 1 in which the hash value is storedso that it can later be retrieved by the server that stores the block ofcontent.
 25. The method of claim 1 in which a content hash is computedas part of the process of depositing the block of content into thestorage system.
 26. The method of claim 25 in which the block of contentis stored at a location or locations determined at least in part by thecontent hash.
 27. The method of claim 25 in which a second content hashis computed as part of the process of depositing a second block ofcontent.
 28. The method of claim 27 in which the values of the first andsecond content hashes are the same and the second deposit relies on theblock of content already stored rather than storing a separate copy ofthe second block of content.
 29. The method of claim 1 in which theplurality of storage system entities comprises a plurality of programsor a plurality of computers or a plurality of storage system users. 30.The method of claim 1 in which the plurality of storage system entitiescomprises a plurality of data structures that contain pointers to theblock of content.
 31. The method of claim 1 in which the data object isa version data object that records the state of a versioned object at amoment of time, and the set of rules that govern when deletion isallowed for the data object depends upon information about other versiondata objects that record the state of the versioned object at othermoments of time.
 32. The method of claim 1 in which the block of contentis also a constituent of a second data object that is distinct from thedata object, and reference source identifiers are associated with thedata object and the second data object.